import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/get?${stringify(params)}`);
}


export async function insertForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/insert`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/update`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/deleteByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/updateByMap`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/getOne`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/queryPage`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/count`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/insertBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProResourceAction(params = {}) {
    return request(`/${webpath}/web/api/service/proresourceaction/updateBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}